﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Silverlight_Client.Commands_Utils;
using System.Collections.ObjectModel;
using Silverlight_Client.Views;
using Silverlight_Client.Models;

namespace Silverlight_Client.ViewModels
{
    public class SharingPageVM : IViewModelBase
    {
        #region Fields

        private String      _username;
        private ICommand    _blogcmd, _charmcmd, _economycmd, _newscmd, _variouscmd;
        private ICommand    _hightechcmd, _mediacmd, _recreationcmd, _sportcmd;
        private ICommand    _searchcmd, _sharecmd;
        private String      _searchtext;
        private ObservableCollection<SharingsPoadCastV>     _sharingpoadcastlist;
        private ObservableCollection<String>                _selectedcontents;
        public ObservableCollection<SharingMyContentM>      _mycontents;

        #endregion

        #region Properties

        public String Username 
        {
            get { return _username; }
            set 
            {
                if (_username == value) return;
                _username = value;
                RaisePropertyChanged("Username");
            }
        }
        public String SearchText
        {
            get { return _searchtext; }
            set
            {
                if (_searchtext == value) return;
                _searchtext = value;
                RaisePropertyChanged("SearchText");
            }
        }
        public ObservableCollection<SharingsPoadCastV>  SharingPoadcastList
        {
            get { return _sharingpoadcastlist; }
            set
            {
                if (_sharingpoadcastlist == value) return;
                _sharingpoadcastlist = value;
                RaisePropertyChanged("SharingPoadcastList");
            }
        }
        public ObservableCollection<String>             SelectedContents
        {
            get { return _selectedcontents; }
            set
            {
                if (_selectedcontents == value) return;
                _selectedcontents = value;
                RaisePropertyChanged("SelectedContents");
            }
        }
        public ObservableCollection<SharingMyContentM>  MyContents
        {
            get { return _mycontents; }
            set
            {
                if (_mycontents == value) return;
                _mycontents = value;
                RaisePropertyChanged("MyContents");
            }
        }
        
        #endregion

        #region Commands

        public ICommand BlogCmd
        {
            get { return _blogcmd; }
        }
        public ICommand CharmCmd
        {
            get { return _charmcmd; }
        }
        public ICommand EconomyCmd
        {
            get { return _economycmd; }
        }
        public ICommand NewsCmd
        {
            get { return _newscmd; }
        }
        public ICommand VariousCmd
        {
            get { return _variouscmd; }
        }
        public ICommand HighTechCmd
        {
            get { return _hightechcmd; }
        }
        public ICommand MediaCmd
        {
            get { return _mediacmd; }
        }
        public ICommand RecreationCmd
        {
            get { return _recreationcmd; }
        }
        public ICommand SportCmd
        {
            get { return _sportcmd; }
        }
        public ICommand SearchCmd
        {
            get { return _searchcmd; }
        }
        public ICommand ShareCmd
        {
            get { return _sharecmd; }
        }

        #endregion

        #region Commands Functions

        public void BlogFunc()
        { }
        public void CharmFunc()
        { }
        public void EconomyFunc()
        { }
        public void NewsFunc()
        { }
        public void VariousFunc()
        { }
        public void HighTechFunc()
        { }
        public void MediaFunc()
        { }
        public void RecreationFunc()
        { }
        public void SportFunc()
        { }
        public void SearchFunc()
        { }
        public void ShareFunc()
        { }

        #endregion

        #region Functions
        
        #endregion

        #region Ctor

        public SharingPageVM()
        {
            _username = String.Empty;
            _blogcmd = new RelayCommand(BlogFunc) { IsEnabled = true };
            _charmcmd = new RelayCommand(CharmFunc) { IsEnabled = true };
            _economycmd = new RelayCommand(EconomyFunc) { IsEnabled = true };
            _newscmd = new RelayCommand(NewsFunc) { IsEnabled = true };
            _variouscmd = new RelayCommand(VariousFunc) { IsEnabled = true };
            _hightechcmd = new RelayCommand(HighTechFunc) { IsEnabled = true };
            _mediacmd = new RelayCommand(MediaFunc) { IsEnabled = true };
            _recreationcmd = new RelayCommand(RecreationFunc) { IsEnabled = true };
            _sportcmd = new RelayCommand(SportFunc) { IsEnabled = true };
            _searchcmd = new RelayCommand(SearchFunc) { IsEnabled = true };
            _sharecmd = new RelayCommand(ShareFunc) { IsEnabled = true };
            _searchtext = String.Empty;
            _sharingpoadcastlist = new ObservableCollection<SharingsPoadCastV>();
            _selectedcontents = new ObservableCollection<string>();
            _mycontents = new ObservableCollection<SharingMyContentM>();
        }

        #endregion
    }
}
